//
//  UIButton+Extension.swift
//  微博
//
//  Created by Mr.Deng on 15/9/21.
//  Copyright © 2015年 Mr.Deng. All rights reserved.
//

import UIKit

extension UIButton {
    convenience init(imageName:String, backgroundImageName:String) {
        self.init()
        
        setImage(UIImage(named: imageName), forState:  .Normal)
        setImage(UIImage(named: imageName + "_highlighted"), forState:  .Highlighted)
        setBackgroundImage(UIImage(named: backgroundImageName), forState:  .Normal)
        setBackgroundImage(UIImage(named: backgroundImageName + "_highlighted"), forState:  .Highlighted)
        
        sizeToFit()
    }
}
